package com.hezuti.sns.domain;

import java.util.Date;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.Table;

/**
 * 用户登录流水表<br>
 * 
 * @author douxiaoyu
 */
@Entity
@Table(name = "login_serial")
public class Lserial  {

	/** 字段-uid */
	public static final String FIELD_UID = "uid";

	/** 用户登陆状态-手机 */
	public static final int LOGIN_TYPE_MOB_EMAIL = 1;
	public static final int LOGIN_TYPE_MOB_PHONE= 2;
	

	/** 用户登陆状态-网站 */
	public static final int LOGIN_TYPE_WEB_PHONE = 3;
	public static final int LOGIN_TYPE_WEB_EMAIL=4;

	public static final String FIELD_LOGIN_TIME = "login_time";

	@Id
	@GeneratedValue(strategy = GenerationType.IDENTITY)
	private int id;

	@Column(name = "uid", nullable = false)
	private int uid;

	/**
	 * 登录方式: 手机：1, web：2
	 */
	private int login_type;

	/** 登录时间 */
	private Date login_time;

	/** 登录ip */
	private String ip;
	
	public int getId() {
	    return id;
	}

	public void setId(int id) {
	    this.id = id;
	}

	public int getUid() {
	    return uid;
	}

	public void setUid(int uid) {
	    this.uid = uid;
	}

	public int getLogin_type() {
	    return login_type;
	}

	public void setLogin_type(int login_type) {
	    this.login_type = login_type;
	}

	public Date getLogin_time() {
	    return login_time;
	}

	public void setLogin_time(Date login_time) {
	    this.login_time = login_time;
	}

	public String getIp() {
	    return ip;
	}

	public void setIp(String ip) {
	    this.ip = ip;
	}
	
}
